package com.wuyb.pojo.param;

import com.wuyb.pojo.valid.ValidGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

/**
 * 用户登录校验
 *
 * @Author: wyb
 * @Date: 2024/01/03/14:10
 * @Description:
 */
@Data
@EqualsAndHashCode
@ApiModel(description = "管理员实体")
public class UserLoginParam {

    @ApiModelProperty(value = "用户名", required = true)
    @NotBlank(message = "用户名不能为空")
    @Length(max = 20, message = "用户名长度不能大于20")
    private String username;


    @ApiModelProperty(value = "密码", required = true)
    @NotBlank(message = "密码不能为空")
    @Length(max = 20, message = "密码长度不能大于20")
    private String password;


    @ApiModelProperty(value = "验证码", required = true)
    @NotBlank(message = "验证码不能为空", groups = ValidGroups.Default.class)
    private String code;
}
